docker cp -a airmedChaincodes/ cli:/opt/gopath/src/github.com/hyperledger/fabric/peer
docker-compose down -v
docker-compose up -d
docker exec -it cli peer chaincode install -l "node" -n airmed -p /opt/gopath/src/github.com/hyperledger/fabric/peer/airmedChaincodes/chaincode -v v1
docker exec -it cli peer chaincode instantiate -C mychannel -l "node" -n airmed -v v1 -c '{"Args":[]}' -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
#快速更换密钥操作 configfile_temp.yaml在工具包中
sk1=$(ls ../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/)
sk2=$(ls ../fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/)
cp -rf ./fabric-api/config/configfile_temp.yaml ./fabric-api/config/configfile.yaml
sed -i "s/sk1/$sk1/" ./fabric-api/config/configfile.yaml
sed -i "s/sk2/$sk2/" ./fabric-api/config/configfile.yaml